pub mod contribution_keyword_manager;
pub mod context_manager;
pub mod event_manager;
pub mod extension_manager;
pub mod helper;
pub mod manifest_manager;
pub mod replenish;
pub mod when_eval;

pub use contribution_keyword_manager::{IContributionKeywordImpl, IContributionManager, RequestContributionContext};
pub use extension_manager::IExtensionManager;
pub use manifest_manager::IManifestManager;

// use crate::manifest::Manifest;
pub use context_manager::ExpansionContext;
use std::any::Any;

/// A trait representing a full plugin package, containing both manifest data and the implementation.
pub trait PluginPackage: Send + Sync {
    fn manifest_str(&self) -> &'static str;
    fn implementation(&self) -> Box<dyn IExpansionImplement>;
}

pub trait IExpansionImplement: Send + Sync {
    fn before_activate(&self, _ctx: &ExpansionContext) {}
    fn activate(&self, ctx: ExpansionContext) -> Option<Box<dyn Any + Send + Sync>>;
    fn post_activated(&self, _ctx: &ExpansionContext) {}
    fn deactivate(&self);
    fn get_context_to_inject(&self) -> Option<Box<dyn Any + Send + Sync>> {
        None
    }
}
